<template>
  <div class="about">
    <h1 class="title">
      This page is loaded from the {{ name }}
    </h1>
    <h2
      v-if="name === 'client'"
      class="info">
      Please refresh the page
    </h2>
    <nuxt-link
      class="button"
      to="/">
      Home page
    </nuxt-link>
  </div>
</template>

<script>
  export default {
    name: 'About',
    asyncData({ req }) {
      return {
        name: req ? 'server' : 'client'
      }
    },
    head() {
      return {
        title: `About Page (${this.name}-side)`
      }
    }
  }
</script>

<style scoped>

</style>
